package com.exam.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.exam.entity.Evaluation;
import com.exam.entity.TestResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description:
 * @Company：
 * @Author:
 * @Date: 2022/5/1 17:08
 * @Version 1.0
 */

@Mapper
public interface EvaluationMapper {

    Integer add(Evaluation evaluation);


    Integer addResult(TestResult testResult);


    int get(TestResult testResult);


    Integer updateResult(TestResult testResult);


    Evaluation findById(Integer id);


    List<TestResult> findAnswer(@Param("id") Integer id, @Param("paperId") Integer paperId,@Param("type") Integer type);


    IPage<Evaluation> findAll(@Param("teacherPage") Page<Evaluation> teacherPage,@Param("userId") Integer userId, @Param("teacherName") String teacherName,@Param("source") String source);
}
